﻿'use strict';
/**
 *App Config class 
 *auth:lww
 *version:1.0
 *date:2014-10-11
 *@param:context:Application
 */
var appHost = "<#if appHost??>${appHost}</#if>";

function AppConfig(context) {
    window.appConfig = this;
    this.version = "1.0";
    this.name = "AppConfig";
    this.mContext = context;
    this.mTitle = "ConfigAdmin";
}
//get App Title 
AppConfig.prototype.getTitle = function () {
    return this.mTitle;
};
//get App frame pages
AppConfig.prototype.getAboutPageUrl = function () {
    return appHost.concat("/auth/framepages/about.htm?vcode=" + randomcode());
};
AppConfig.prototype.getChildDataPageUrl = function (menuInfo) {
    if (isNull(menuInfo)) {
        return appHost.concat("/auth/framepages/child.htm?vcode=" + randomcode());
    }
    return this.buildChildDataPageUrl(menuInfo.getPath());
};
AppConfig.prototype.buildChildDataPageUrl = function (path) {   
    var linkUrl = appHost.concat(path);
    if (!empty(linkUrl)) {
        if (linkUrl.indexOf('?') > 0) {
            return linkUrl + "&vcode=" + randomcode();
        }
        return linkUrl + "?vcode=" + randomcode();
    }
};

markscript("AppConfig");
//end AppConfig.js